//
//  UIView+DCHView.h
//  FareWell_Obj_C
//
//  Created by 丁诚昊 on 16/1/5.
//  Copyright © 2016年 iOS.ZSTech.丁诚昊(831). All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIView+Geometry.h"

/// Miss LuoYang is the first one who i loved for so many years , despired such much battles we've been through , we still cann't be one familized couple , might it be our fate ?

/// < WWDC2014 - UIScrollView > is the very beggining of [PMUI] & [TouchMeBaby] & [PhyMoVAL]
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
#import <QuartzCore/QuartzCore.h>
#import <OpenGLES/ES1/gl.h>

@interface UIView (DCHView)
@property (nonatomic,assign) CGFloat GeoLeft;
@property (nonatomic,assign) CGFloat GeoTop;
@property (nonatomic,assign) CGFloat GeoCenterX; ///1.1
@property (nonatomic,assign) CGFloat GeoCenterY; ///1.2
@property (nonatomic,assign) CGFloat GeoWidth;   
@property (nonatomic,assign) CGFloat GeoHeight;  ///2.1
@property (nonatomic,assign) CGSize  GeoSize;    ///3.0
/**
 * @param 从文件读取一个storyboard文件并渲染一个UIView
 */
+ (UIView*) loadStroyboardfromIO:(NSString*)baseUrl;

/**
 阴影的位置和宽度 附着到View背后 默认为浅灰色 拟态：太阳
 @param 一个View指针引用
 @return 返回一个引用
 */
///根据一天中太阳的时间位置渲染的阴影强度枚举
typedef enum ShadowStrongitude{
    shadonwLevelMorning = 1,
    shadonwLevelMiddle = 3,
    shadonwLevelStrong =2,
    shadonwLevelEvening = 4
}shadonwLevel;

/** shadow + cornder 圆角矩形 + 边框 */
+ (void*) Rendering_ShadowView:(UIView*)view
                   strongLevel:(shadonwLevel)level
                  cornerRadius:(CGFloat)value;

+ (void*) Rendering_ShadowView:(UIView*)view strongLevel:(shadonwLevel)level;

/**
 * 递归接受一个View 并渲染内部的平层所有View 添加阴影效果
 * @param String ---> 必须指定View的ClassName名称 否则不进行渲染....
 */
+ (void*) Rendering_ShadowView_Recursively:(UIView*)oriView
                                 ClassName:(Class)clsName;
/**
 阴影的位置和宽度 附着到View背后 默认为浅灰色 拟态：太阳
 @param 一个View指针引用
 @return 返回一个引用
 */
+ (void*) Rendering_setBgImg2UIView:(UIView*)view with:(NSString*)imageUrl;

+ (UIBarButtonItem*) _createItemView:(UIImage*)imageName
                         withHLImage:(UIImage*)HLImage
                              target:(id)target
                           actionSel:(SEL)selector;
@end

@interface UIView (shadowViewInEnglend)
+(void) statusBatteryHSBView:(UIView*)superView WithTag:(long)tag;
/**
 * 给一个覆盖的毛玻璃
 */
+(UIView*) DCH_addBlurView :(CGRect)frame blurType:(UIBlurEffectStyle)blurType ;
#pragma mark - 从Swift中移植过来的方法 添加时间2016-3-12
+(void) simplifyWithCornerRadius:(UIView*)container with:(CGFloat)cornerRadius ;
@end


typedef enum {
    RectPramsEnumWidth,
    RectPramsEnumHeight
}RectPramsEnum;

@interface UIView (calculatedStringFrame)
/** 一个字符串函数： 传入该字符串所用的字体号 和最大排布宽度 就可以得到一个CGRect */
+ (CGRect) StringRectWithFont:(UIFont*)font
                         type:(RectPramsEnum)enumType
                   ParamValue:(CGFloat)value
                     InString:(NSString*)oriStr;
@end



